3.275 \(\int (c+d x) \csc ^2(a+b x) \sec ^2(a+b x) \, dx\)

Optimal. Leaf size=35 \[ \frac {d \log (\sin (2 a+2 b x))}{b^2}-\frac {2 (c+d x) \cot (2 a+2 b x)}{b} \]

[Out]

-2*(d*x+c)*cot(2*b*x+2*a)/b+d*ln(sin(2*b*x+2*a))/b^2

________________________________________________________________________________________

Rubi [A]  time = 0.06, antiderivative size = 35, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, integrand size = 22, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.136, Rules used = {4419, 4184, 3475} \[ \frac {d \log (\sin (2 a+2 b x))}{b^2}-\frac {2 (c+d x) \cot (2 a+2 b x)}{b} \]

Antiderivative was successfully verified.

[In]

Int[(c + d*x)*Csc[a + b*x]^2*Sec[a + b*x]^2,x]

[Out]

(-2*(c + d*x)*Cot[2*a + 2*b*x])/b + (d*Log[Sin[2*a + 2*b*x]])/b^2

Rule 3475

Int[tan[(c_.) + (d_.)*(x_)], x_Symbol] :> -Simp[Log[RemoveContent[Cos[c + d*x], x]]/d, x] /; FreeQ[{c, d}, x]

Rule 4184

Int[csc[(e_.) + (f_.)*(x_)]^2*((c_.) + (d_.)*(x_))^(m_.), x_Symbol] :> -Simp[((c + d*x)^m*Cot[e + f*x])/f, x]
+ Dist[(d*m)/f, Int[(c + d*x)^(m - 1)*Cot[e + f*x], x], x] /; FreeQ[{c, d, e, f}, x] && GtQ[m, 0]

Rule 4419

Int[Csc[(a_.) + (b_.)*(x_)]^(n_.)*((c_.) + (d_.)*(x_))^(m_.)*Sec[(a_.) + (b_.)*(x_)]^(n_.), x_Symbol] :> Dist[
2^n, Int[(c + d*x)^m*Csc[2*a + 2*b*x]^n, x], x] /; FreeQ[{a, b, c, d, m}, x] && IntegerQ[n] && RationalQ[m]

Rubi steps

\begin {align*} \int (c+d x) \csc ^2(a+b x) \sec ^2(a+b x) \, dx &=4 \int (c+d x) \csc ^2(2 a+2 b x) \, dx\\ &=-\frac {2 (c+d x) \cot (2 a+2 b x)}{b}+\frac {(2 d) \int \cot (2 a+2 b x) \, dx}{b}\\ &=-\frac {2 (c+d x) \cot (2 a+2 b x)}{b}+\frac {d \log (\sin (2 a+2 b x))}{b^2}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.20, size = 32, normalized size = 0.91 \[ \frac {d \log (\sin (2 (a+b x)))-2 b (c+d x) \cot (2 (a+b x))}{b^2} \]

Antiderivative was successfully verified.

[In]

Integrate[(c + d*x)*Csc[a + b*x]^2*Sec[a + b*x]^2,x]

[Out]

(-2*b*(c + d*x)*Cot[2*(a + b*x)] + d*Log[Sin[2*(a + b*x)]])/b^2

________________________________________________________________________________________

fricas [B]  time = 0.45, size = 75, normalized size = 2.14 \[ \frac {d \cos \left (b x + a\right ) \log \left (-\frac {1}{2} \, \cos \left (b x + a\right ) \sin \left (b x + a\right )\right ) \sin \left (b x + a\right ) + b d x - 2 \, {\left (b d x + b c\right )} \cos \left (b x + a\right )^{2} + b c}{b^{2} \cos \left (b x + a\right ) \sin \left (b x + a\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*x+c)*csc(b*x+a)^2*sec(b*x+a)^2,x, algorithm="fricas")

[Out]

(d*cos(b*x + a)*log(-1/2*cos(b*x + a)*sin(b*x + a))*sin(b*x + a) + b*d*x - 2*(b*d*x + b*c)*cos(b*x + a)^2 + b*
c)/(b^2*cos(b*x + a)*sin(b*x + a))

________________________________________________________________________________________

giac [F(-1)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*x+c)*csc(b*x+a)^2*sec(b*x+a)^2,x, algorithm="giac")

[Out]

Timed out

________________________________________________________________________________________

maple [B]  time = 0.09, size = 182, normalized size = 5.20 \[ \frac {\frac {c}{2 b}+\frac {d x}{2 b}-\frac {3 c \left (\tan ^{2}\left (\frac {b x}{2}+\frac {a}{2}\right )\right )}{b}+\frac {c \left (\tan ^{4}\left (\frac {b x}{2}+\frac {a}{2}\right )\right )}{2 b}-\frac {3 d x \left (\tan ^{2}\left (\frac {b x}{2}+\frac {a}{2}\right )\right )}{b}+\frac {d x \left (\tan ^{4}\left (\frac {b x}{2}+\frac {a}{2}\right )\right )}{2 b}}{\tan \left (\frac {b x}{2}+\frac {a}{2}\right ) \left (\tan ^{2}\left (\frac {b x}{2}+\frac {a}{2}\right )-1\right )}+\frac {d \ln \left (\tan \left (\frac {b x}{2}+\frac {a}{2}\right )\right )}{b^{2}}+\frac {d \ln \left (\tan \left (\frac {b x}{2}+\frac {a}{2}\right )-1\right )}{b^{2}}+\frac {d \ln \left (\tan \left (\frac {b x}{2}+\frac {a}{2}\right )+1\right )}{b^{2}}-\frac {2 d \ln \left (1+\tan ^{2}\left (\frac {b x}{2}+\frac {a}{2}\right )\right )}{b^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((d*x+c)*csc(b*x+a)^2*sec(b*x+a)^2,x)

[Out]

(1/2*c/b+1/2*d*x/b-3*c/b*tan(1/2*b*x+1/2*a)^2+1/2*c/b*tan(1/2*b*x+1/2*a)^4-3/b*d*x*tan(1/2*b*x+1/2*a)^2+1/2/b*
d*x*tan(1/2*b*x+1/2*a)^4)/tan(1/2*b*x+1/2*a)/(tan(1/2*b*x+1/2*a)^2-1)+d/b^2*ln(tan(1/2*b*x+1/2*a))+d/b^2*ln(ta
n(1/2*b*x+1/2*a)-1)+d/b^2*ln(tan(1/2*b*x+1/2*a)+1)-2*d/b^2*ln(1+tan(1/2*b*x+1/2*a)^2)

________________________________________________________________________________________

maxima [B]  time = 0.48, size = 308, normalized size = 8.80 \[ -\frac {2 \, c {\left (\frac {1}{\tan \left (b x + a\right )} - \tan \left (b x + a\right )\right )} - \frac {2 \, a d {\left (\frac {1}{\tan \left (b x + a\right )} - \tan \left (b x + a\right )\right )}}{b} - \frac {{\left ({\left (\cos \left (4 \, b x + 4 \, a\right )^{2} + \sin \left (4 \, b x + 4 \, a\right )^{2} - 2 \, \cos \left (4 \, b x + 4 \, a\right ) + 1\right )} \log \left (\cos \left (2 \, b x + 2 \, a\right )^{2} + \sin \left (2 \, b x + 2 \, a\right )^{2} + 2 \, \cos \left (2 \, b x + 2 \, a\right ) + 1\right ) + {\left (\cos \left (4 \, b x + 4 \, a\right )^{2} + \sin \left (4 \, b x + 4 \, a\right )^{2} - 2 \, \cos \left (4 \, b x + 4 \, a\right ) + 1\right )} \log \left (\cos \left (b x + a\right )^{2} + \sin \left (b x + a\right )^{2} + 2 \, \cos \left (b x + a\right ) + 1\right ) + {\left (\cos \left (4 \, b x + 4 \, a\right )^{2} + \sin \left (4 \, b x + 4 \, a\right )^{2} - 2 \, \cos \left (4 \, b x + 4 \, a\right ) + 1\right )} \log \left (\cos \left (b x + a\right )^{2} + \sin \left (b x + a\right )^{2} - 2 \, \cos \left (b x + a\right ) + 1\right ) - 8 \, {\left (b x + a\right )} \sin \left (4 \, b x + 4 \, a\right )\right )} d}{{\left (\cos \left (4 \, b x + 4 \, a\right )^{2} + \sin \left (4 \, b x + 4 \, a\right )^{2} - 2 \, \cos \left (4 \, b x + 4 \, a\right ) + 1\right )} b}}{2 \, b} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*x+c)*csc(b*x+a)^2*sec(b*x+a)^2,x, algorithm="maxima")

[Out]

-1/2*(2*c*(1/tan(b*x + a) - tan(b*x + a)) - 2*a*d*(1/tan(b*x + a) - tan(b*x + a))/b - ((cos(4*b*x + 4*a)^2 + s
in(4*b*x + 4*a)^2 - 2*cos(4*b*x + 4*a) + 1)*log(cos(2*b*x + 2*a)^2 + sin(2*b*x + 2*a)^2 + 2*cos(2*b*x + 2*a) +
 1) + (cos(4*b*x + 4*a)^2 + sin(4*b*x + 4*a)^2 - 2*cos(4*b*x + 4*a) + 1)*log(cos(b*x + a)^2 + sin(b*x + a)^2 +
 2*cos(b*x + a) + 1) + (cos(4*b*x + 4*a)^2 + sin(4*b*x + 4*a)^2 - 2*cos(4*b*x + 4*a) + 1)*log(cos(b*x + a)^2 +
 sin(b*x + a)^2 - 2*cos(b*x + a) + 1) - 8*(b*x + a)*sin(4*b*x + 4*a))*d/((cos(4*b*x + 4*a)^2 + sin(4*b*x + 4*a
)^2 - 2*cos(4*b*x + 4*a) + 1)*b))/b

________________________________________________________________________________________

mupad [B]  time = 1.66, size = 55, normalized size = 1.57 \[ \frac {d\,\ln \left ({\mathrm {e}}^{a\,4{}\mathrm {i}}\,{\mathrm {e}}^{b\,x\,4{}\mathrm {i}}-1\right )}{b^2}-\frac {\left (c+d\,x\right )\,4{}\mathrm {i}}{b\,\left ({\mathrm {e}}^{a\,4{}\mathrm {i}+b\,x\,4{}\mathrm {i}}-1\right )}-\frac {d\,x\,4{}\mathrm {i}}{b} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((c + d*x)/(cos(a + b*x)^2*sin(a + b*x)^2),x)

[Out]

(d*log(exp(a*4i)*exp(b*x*4i) - 1))/b^2 - ((c + d*x)*4i)/(b*(exp(a*4i + b*x*4i) - 1)) - (d*x*4i)/b

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \left (c + d x\right ) \csc ^{2}{\left (a + b x \right )} \sec ^{2}{\left (a + b x \right )}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*x+c)*csc(b*x+a)**2*sec(b*x+a)**2,x)

[Out]

Integral((c + d*x)*csc(a + b*x)**2*sec(a + b*x)**2, x)

________________________________________________________________________________________